package com.laborder.sysyy.dao;

import com.laborder.sysyy.entity.Course;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
/**
 * @Function: 课程dao层
 * @author: 786107529@qq.com FJL
 * @date:2018/9/8 17:31
 */
@Repository
@Mapper
public interface CourseDaoMapper {
	/**
	 * @Function: 课程分页查询
	 * @author: 786107529@qq.com FJL
	 * @date:2018/9/8 17:34
	 */
	  List<Course> findCourseWithPage(Map<String, Object> map);
	  /**
	   * @Function: 查询总数
	   * @author: 786107529@qq.com FJL
	   * @date:2018/9/8 17:35
	   */
	  int getCourseCount(Map<String, Object> map);
	  /**
	   * @Function: 添加课程
	   * @author: 786107529@qq.com FJL
	   * @date:2018/9/8 17:36
	   */
	  int saveCourseInfo(Course course);
	  /**
	   * @Function: 更新课程信息
	   * @author: 786107529@qq.com FJL
	   * @date:2018/9/8 17:36
	   */
	  int updateCourseInfo(Course course);
	  /**
	   * @Function: 删除课程信息
	   * @author: 786107529@qq.com FJL
	   * @date:2018/9/8 17:36
	   */
	  int delCourseInfo(int cId);
	  /**
	   * @Function: 根据ID查询
	   * @author: 786107529@qq.com FJL
	   * @date:2018/9/8 17:36
	   */
	  Course getCourseInfoById(String cId);
	  /**
	   * @Function: 通过课程名称查重
	   * @author: 786107529@qq.com FJL
	   * @date:2019/1/8 22:00
	   */
	  Course getCourseInfoByName(String cName);
	List<Course> findAllCourse();
}
